package com.cykj.pos.mapper;

import com.cykj.pos.domain.BizBehalfPayment;
import com.cykj.pos.domain.BizMicroInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cykj.pos.domain.dto.CashOutVO;
import org.apache.ibatis.annotations.Param;

/**
 * 报件小微商户信息Mapper接口
 *
 * @author ningbingwu
 * @date 2021-01-11
 */
public interface BizMicroInfoMapper extends BaseMapper<BizMicroInfo> {
    /**
     * 通过用户id查询商户钱包等信息
     * @param userId
     * @return
     */
    CashOutVO selectMerchMicroInfoByUserIdAndChannel(@Param("userId") Long userId, @Param("channelId")Long channelId);

    CashOutVO selectMerchMicroInfoByUserId(Long userId);

    int updataMicroInfo(BizMicroInfo bizMicroInfo);

    String getdfTypeByMerchId(String merchId);

    String getDeptIdByuserId(String userId);

    BizBehalfPayment getBehalfPaymentByDeptId(String deptId);

    BizBehalfPayment getBehalfPaymentByCode(String code);

    CashOutVO selectProfit(@Param("userId") Long userId, @Param("channelId")Long channelId);

    CashOutVO selectReward(@Param("userId") Long userId, @Param("channelId")Long channelId);

    CashOutVO selectWithdrawal(@Param("userId") Long userId, @Param("channelId")Long channelId);
}
